package domain;

import java.util.Collection;
import java.util.HashSet;

import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

@Entity
@Access(AccessType.PROPERTY)
@Table(uniqueConstraints = { @UniqueConstraint(columnNames = { "userAccount_id" }) })
public class Administrator extends Actor {
	// Constructors -----------------------------------------------------------

	public Administrator() {
		super();
		userGroups= new HashSet<UserGroup>();
	}

	// Attributes -------------------------------------------------------------

	// Relationships ----------------------------------------------------------

	private Collection<UserGroup> userGroups;

	
	@OneToMany(mappedBy = "administrator")
	public Collection<UserGroup> getUserGroups() {
		return userGroups;
	}

	public void setUserGroups(Collection<UserGroup> userGroups) {
		this.userGroups = userGroups;
	}

}
